-- GENERATED SPELL FOR [Phantom Attendant] --


function spell0_16406(pUnit, Event) --@Kick,n/a--
pUnit:FullCastSpellOnTarget(29586,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16406', 5278, 1)
end

function spell1_16406(pUnit, Event) --@Shadow Rejuvenation,Heal--
pUnit:FullCastSpellOnTarget(29587,pUnit)
pUnit:RegisterEvent('Sorts_16406', 12000, 1)
end

function Sorts_16406(pUnit, Event)
local choix_sorts_16406 = math.random(0, 1)
if choix_sorts_16406 == 0 then
pUnit:RegisterEvent('spell0_16406', 1, 1)
end
if choix_sorts_16406 == 1 then
pUnit:RegisterEvent('spell1_16406', 1, 1)
end
end

function mob16406_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16406', math.random(1500, 3000), 1)
end

function mob16406_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16406_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16406_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16406, 1, 'mob16406_Action')
RegisterUnitEvent(16406, 2, 'mob16406_Leave')
RegisterUnitEvent(16406, 3, 'mob16406_Kill')
RegisterUnitEvent(16406, 4, 'mob16406_Die')
